/*
 * @Description: 表单验证参数
 * @Author: James324
 * @Date: 2023-09-27 10:50:34
 * @LastEditors: James324
 * @LastEditTime: 2023-10-27 09:46:12
 */
import { generateRandomId, InputType } from '@/utils';

export const formConfig: PageConfig = {
    id: generateRandomId(),
    items: [
        {
            modelKey: 'bomCode',
            columnProps: {
                label: 'BOM编码'
            },
            elInputProps: {
                maxlength: '20',
                showWordLimit: true
            },
            validProps: {
                id: generateRandomId(),
                required: true
            },
            validFormatType: InputType.NUMERIC_ALPHABET_SYMBOLS
        },
        {
            modelKey: 'bomName',
            columnProps: {
                label: 'BOM名称'
            },
            elInputProps: {
                maxlength: '50',
                showWordLimit: true
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            modelKey: 'materialCode',
            itemType: 'other',
            columnProps: {
                label: '父项物料编码'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            modelKey: 'materialName',
            columnProps: {
                label: '父项物料名称'
            },
            elInputProps: {
                disabled: true
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        }
    ]
};
